/**
 * 训练状态枚举
 */
export enum TrainingStatus {
  Waiting = 1,
  Training = 2,
  Fail = 3,
  Success = 4,
  Timeout = 5
}

/**
 * 服务状态（部署状态）
 */
export enum DeployStatus {
  NotDeployed = 1,
  ToBeDeployed = 2,
  Deploying = 3,
  DeploymentFailed = 4,
  DeploymentSuccessful = 5,
  DeploymentTimeout = 6,
  DeploymentPastDue = 7
}

/**
 * 任务详情
 */
export interface TaskDetail {
  createTime: string
  id: string
  name: string
  typeId: 1 | 2
  modelName: string
  trainStatus: TrainingStatus
  deployStatus: DeployStatus
  memory: number
  gpu: number
  cpu: number
  dataNames: string[]
  runParameters: { name: string; value: string }[]
  createType?: number // 创建类型
  readOnly?: number // 数据权限 0只读 1读写
}
